<template>
  <div>
    <div class="search">
     
    </div>
    <div class="list">
      <div class="item"  v-for="(v,i) in item" :key="i">
        <div class="img">
          <img :src="v.foodPic" >
        </div>
        <div class="xiangqing">
          <p class="name">{{v.foodName}}</p>
          <p class="guige">{{v.guige}}</p>
          <p class="price">{{v.price}}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { findDiscount } from "@/apis/liwenjing/diancan.js";
export default {
    data(){
        return {
            item:[]
        }
    },
        mounted(){
      findDiscount().then(ok=>{
        console.log(ok);
        this.item=ok.data.data
      })
    }

}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}

.search{
  height: 36px;
  width: 1000px;
  margin: auto;
  /* background-color: #bab6b6; */
}
.search input{
  margin: 5px;
  height: 28px;
  width: 1000px;
  border-color: #bab6b6;
  border-radius: 5px;
}

.list{
    width: 1200px;
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    margin: 5px auto;
    border-radius: 8px;
}
.list .item{
  width: 280px;
  height: 120px;
  border: 1px solid #bab6b6;
  border-radius: 6px;
  background-color: rgb(255, 207, 191);
  margin: 10px 10px;
  display: flex;
  justify-content: space-around;
  box-sizing: border-box;

}
img{
    width: 100px;
    height: 90px;
    border-radius: 10px;
    margin: 14px 0;
}
.item .xiangqing{
  width: 100px;
  height: 100px;
  line-height: 28px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.xiangqing .price{
  align-self: flex-end;
}




</style>